home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / PowerPC / vbcc / machines / amigawos / libsrc / stdio / fflush.c < prev    next >
C/C++ Source or Header  |  1998-08-02  |  264b  |  19 lines

  1. #include <stdio.h>
  2.  
  3. extern FILE *_firstfile;
  4.  
  5. int fflush(FILE *f)
  6. {
  7.   if (!f) {
  8.     f = _firstfile;
  9.     while (f) {
  10.       if (f->flags&_WRITE)
  11.         if (_flushbuf(f))
  12.           return (EOF);
  13.       f = f->next;
  14.     }
  15.     return(0);
  16.   }
  17.   return (_flushbuf(f));
  18. }
  19.